package com.t8;

/**
 * Created by xuyiwei on 2018/7/19.
 */
public class E17 {
    public static void main(String[] args) {
        Cycle[] cycles = {
                new Cycle(),
                new Unicycle(),
                new Bicycle(),
                new Tricycle()
        };
        ((Unicycle) cycles[0]).roud1();

    }
}

class Cycle {
    public void roud() {
        System.out.println("Cycle轮胎会转");
    }
}

class Unicycle extends Cycle {
    public void roud() {
        System.out.println("Unicycle轮胎会转");
    }

    public void roud1() {
        System.out.println("Unicycle1轮胎会转");
    }
}

class Bicycle extends Cycle {
    public void roud() {
        System.out.println("Bicycle轮胎会转");
    }

    public void roud2() {
        System.out.println("Bicycle1轮胎会转");
    }
}

class Tricycle extends Cycle {
    public void roud() {
        System.out.println("Tricycle轮胎会转");
    }

    public void roud3() {
        System.out.println("Tricycle1轮胎会转");
    }
}